C (157/301)

From:Gabriele Svelto
Date:25 Aug 99 at 21:38:58
Subject:ExecBase & 'RESET:starting PC' exception

From: Gabriele Svelto <jlpicard@tiscalinet.it>

Hello everybody,
this question is a little bit on the asm side so I hope I'm not making an
off topic...
I read in the RKRM that ExecBase is the only part of the OS which is at an
absolute address in memory ($00000004). Well since I took a look at some
asm tutorials (as I'm interested in putting in asm some routines which are
reaaally time crictical...) and found that the location $4 contained the
pointer to the 'RESET: starting PC' exception. Now after taking a moment to
think 'bout I came to the conclusion that the routine pointed by ExecBase
is the routine which is executed immediately after a reset... This explains
a lot of things, for example this should explain why functions are always
located in lower memory than the Library Base, for exec it is obviously
'cos the Amiga starts executing the code after the 'RESET: starting PC'
pointer (you set the PC to the correct location and then execute frmo
here...). Now, somebody can tell me if this is true or I've just
misunderstood something?

BTW, what are exceptions in C++? I'm learning C++ now but I haven't found
anything about that in the book I'm reading (maybe it's because it is a
little bit outdated, 1990...).